<template>
  <base-panel>
    <template #header>
      <h3>工况监测</h3>
    </template>
    <div class="unit-grid">
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">1号机组</span>
          <span class="unit-state running">并网态</span>
        </div>
        <div class="unit-power">196.54 MW</div>
      </div>
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">2号机组</span>
          <span class="unit-state standby">不定态</span>
        </div>
        <div class="unit-power">0.00 MW</div>
      </div>
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">3号机组</span>
          <span class="unit-state running">并网态</span>
        </div>
        <div class="unit-power">196.05 MW</div>
      </div>
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">4号机组</span>
          <span class="unit-state running">并网态</span>
        </div>
        <div class="unit-power">198.62 MW</div>
      </div>
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">5号机组</span>
          <span class="unit-state running">并网态</span>
        </div>
        <div class="unit-power">299.60 MW</div>
      </div>
      <div class="unit-row">
        <div class="unit-info">
          <span class="unit-name">6号机组</span>
          <span class="unit-state running">并网态</span>
        </div>
        <div class="unit-power">24.92 MW</div>
      </div>
    </div>
  </base-panel>
</template>

<script setup lang="ts">
import BasePanel from '@/components/BasePanel.vue'
</script>

<style lang="scss" scoped>
.unit-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  
  .unit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(13, 19, 35, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    border: 1px solid rgba(63, 158, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    .unit-info {
      display: flex;
      align-items: center;
      gap: 12px;
      
      .unit-name {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
      }
      
      .unit-state {
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 12px;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        
        &.running {
          color: #67c23a;
          background: rgba(103, 194, 58, 0.15);
          border: 1px solid rgba(103, 194, 58, 0.3);
        }
        
        &.standby {
          color: #e6a23c;
          background: rgba(230, 162, 60, 0.15);
          border: 1px solid rgba(230, 162, 60, 0.3);
        }
      }
    }
    
    .unit-power {
      color: #3f9eff;
      font-size: 14px;
      font-weight: 500;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
  }
}
</style> 